//
//  DescriptionLayer.cpp
//  CanYouDoIt
//
//  Created by hoangtx on 7/8/13.
//
//

#include "DescriptionLayer.h"


bool DescriptionLayer::init(){
    CCSize winSize = CCDirector::sharedDirector()->getWinSize();
    double labelHeight = winSize.height * 0.05f;
    double labelWidth = winSize.width*0.75f;
    descriptionLabel = CCLabelBMFont::create("description", "Info.fnt",labelWidth);
    descriptionLabel->setAnchorPoint(ccp(0.5,0.5f));
    descriptionLabel->setScale(labelHeight / descriptionLabel->getContentSize().height);
    //descriptionLabel->setPosition(ccp(winSize.width/2,));
    this->addChild(descriptionLabel);
    return true;
}

void DescriptionLayer::setPosY(double posY){
    CCSize winSize = CCDirector::sharedDirector()->getWinSize();
    descriptionLabel->setPosition(ccp(winSize.width/2,posY));
}

void DescriptionLayer::setDescriptionString(const char *newString){
    descriptionLabel->setString(newString);
}

